/* 
 * Copyright 2008 Rodrigo Reyes <reyes.rr at gmail dot com>
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you
 * may not use this file except in compliance with the License. You may
 * obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
 * implied. See the License for the specific language governing
 * permissions and limitations under the License.
**/
package net.kornr.canvaschart;

import java.awt.BorderLayout;

import javax.swing.JFrame;
import javax.swing.JPanel;

import net.kornr.abstractcanvas.awt.Canvas;
import net.kornr.abstractcanvas.client.test.PathTest;
import net.kornr.canvaschart.client.test.SimpleXYPlot;

public class AWTDemo extends JPanel
{
	private static final long serialVersionUID = 1L;
	private Canvas m_canvas = new Canvas();

	public AWTDemo()
	{
		this.setLayout(new BorderLayout());
		this.add(BorderLayout.CENTER, m_canvas);
	}

	static public void main(String[] args) throws InterruptedException
	{
		AWTDemo jct = new AWTDemo();
		
		JFrame frame = new JFrame("eeee");
		frame.getContentPane().add(jct);
		frame.setSize(600,400);
		jct.setSize(600, 400);		
		frame.setVisible(true);
		jct.setSize(600,400);
		SimpleXYPlot.plotRandom(jct.m_canvas);
		frame.getContentPane().repaint();

	}

}
